<template "own/default/public/head" />
<template tplx="login_reg">
    <template "own/default/public/tab" />
    <div class="login-body">
        <form @submit.prevent="goReg">
            <div class="login-input">
                <input type="text" placeholder="账号" autocomplete="new-input" required x-model="form.name" />
            </div>
            <div class="login-input">
                <input type="password" placeholder="密码" autocomplete="new-password" required x-model="form.pass" />
            </div>
            <if $UCFG['reg']['input_title']>
                <div class="login-input">
                    <input type="text" placeholder="姓名"  autocomplete="new-input" x-model="form.title" />
                </div>
            </if>
            <if $UCFG['reg']['on']=="mobile">
                <div class="login-input">
                    <input type="phone" placeholder="手机号" maxlength="11" autocomplete="new-input" required x-model="form.mobile" />
                </div>
            </if>
            <if $UCFG['reg']['on']=="email">
                <div class="login-input">
                    <input type="email" placeholder="邮箱" autocomplete="new-input" required x-model="form.email" />
                </div>
            </if>
            <div class="login-input">
                <input type="number" placeholder="验证码" autocomplete="off" maxlength="6" autocomplete="new-input" required x-model="form.code" />
                <img :src="$store.login.captcha" title="点击刷新" @click="$store.login.resetCaptcha()" />
            </div>
            <div class="login-readme">
                <label>
                    <input type="checkbox" checked="checked" required />
                    阅读并同意
                </label>
                <a href="javascript:;" @click="$store.login.openAgree('user','用户协议')">《用户协议》</a>
                <a href="javascript:;" @click="$store.login.openAgree('privacy','隐私声明')">《隐私声明》</a>
            </div>
            <button class="login-btn" type="submit">发送验证码</button>
        </form>
    </div>
</template>
<div class="login-link">
    <a href="{{$_L['url']['own']}}rootid={{$_L['ROOTID']}}&n=login&go={{urlencode($_L['form']['go'])}}">已有账号</a>
    <if $UCFG['reg']['findpass'] gt 0>
        <div class="login-link-line"></div>
        <a href="{{$_L['url']['own']}}rootid={{$_L['ROOTID']}}&n=login&c=find&go={{urlencode($_L['form']['go'])}}">忘记密码</a>
    </if>
</div>
<template "own/default/public/foot" />